<table id="" class="tablesorter"> 
    <thead> 
        <tr> 
            <th>#</th>
            <th><?php echo $lang['text_user_name'] ?></th> 
            <th><?php echo $lang['text_full_name'] ?></th> 
            <th><?php echo $lang['text_email'] ?></th> 
            <th><?php echo $lang['text_phone'] ?></th> 
            <th><?php echo $lang['text_status'] ?></th> 
            <th><?php echo $lang['text_action'] ?></th> 
        </tr> 
    </thead> 

    <tbody> 

        <?php foreach ($users as $user) { ?>
            <tr> 
                <td><?php echo $user->id ?></td> 
                <td><?php echo $user->username ?></td> 
                <td><?php echo $user->firstname . ' ' . $user->lastname ?></td> 
                <td><?php echo $user->email ?></td> 
                <td><?php echo $user->mobile ?></td> 
                <td id="stt<?php echo $user->id ?>"><?php echo ($user->status == 1) ? $lang['text_active'] : $lang['text_deactive'] ?></td> 
                <td>
                    <a href="<?php echo admin_url('user/form/' . $user->id) ?>" title="<?php echo $lang['text_edit'] ?>"><img src="<?php echo base_url() ?>/admin_public/img/Pencil-icon.png"/></a>
                    <div id="status<?php echo $user->id ?>" style="display: inline-block">
                        <?php if ($user->status == 1) { ?>
                            <a href="javascript:de_active(<?php echo $user->id ?>)" title="<?php echo $lang['text_deactive'] ?>"><img src="<?php echo base_url() ?>/admin_public/img/delete-file-icon.png"/></a>
                        <?php } else { ?>
                            <a href="javascript:active(<?php echo $user->id ?>)" title="<?php echo $lang['text_active'] ?>"><img src="<?php echo base_url() ?>/admin_public/img/folder-add-icon.png"/></a>
                        <?php } ?>
                    </div>

                </td> 
            </tr> 
        <?php } ?>
    </tbody> 
</table>